package com.cn.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.http.HttpServletRequest;

public class UploadUtils {

	public static String getFileName(String fileName,HttpServletRequest request){
		String header = request.getHeader("User-Agent");
		if(header.contains("IE")){
			return fileName.substring(fileName.lastIndexOf("\\")+1);
		}else{
			return fileName;
		}
	}
	public static String getDatePath(Date date){
		SimpleDateFormat sdf = new SimpleDateFormat("/yyyy/MM/dd/");
		
		return sdf.format(date);
	}
}
